package com.itlong.cloud.operate.dao;

import com.itlong.cloud.POJO.PO.WwLyOperateAppProjectPO;
import com.itlong.cloud.POJO.VO.operate.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <des>
 *       开发者应用数据访问接口
 * <des>
 *
 * @create Date 2021-08-18
 **/
@Mapper
@Repository
public interface IOperateWwAppDao {

    /**
    * <desc>
    *      获取应用列表
    * </desc>
    * @param params
    * @return: java.util.List<com.itlong.cloud.POJO.PO.WwAppPO>
    * @author LiuYu
    * @date: 2021-08-18
     **/
    List<WwLyOperateAppInfoVO> getAppPageList(Map<String,Object> params);

    /**
    * <desc>
    *     获取总记录数
    * </desc>
    * @param params
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-18
     **/
    Integer getPageCount(Map<String,Object> params);

    /**
     * <desc>
     *    查询项目列表
     * </desc>
     * @param appIds
     * @return: java.util.List<com.itlong.cloud.POJO.VO.operate.WwOperateProjectInfoVO>
     * @author LiuYu
     * @date: 2021-08-19
     **/
    List<WwLyOperateProjectInfoVO> getProjectPageList(@Param("appIds") String appIds);

    /**
    * <desc>
    *     创建应用
    * </desc>
    * @param params
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-19
     **/
    Integer save(Map<String,Object> params);

    /**
    * <desc>
    *      保存应用关联项目
    * </desc>
    * @param list
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-20
     **/
    Integer saveAppProject(List<WwLyOperateAppProjectPO> list);


    /**
    * <desc>
    *     修改应用
    * </desc>
    * @param params
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-19
     **/
    Integer update(Map<String,Object> params);

    /**
    * <desc>
    *   获取应用项目id
    * </desc>
    * @param appId
    * @return: java.lang.String[]
    * @author LiuYu
    * @date: 2021-08-23
     **/
    List<WwLyOperateAppProjectPO> getAppProjects(@Param("appId") String appId);

    /**
    * <desc>
    *   删除应用项目id
    * </desc>
    * @param appProjectIds
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-23
     **/
    Integer deleteAppProjects(@Param("appProjectIds")String appProjectIds);
    /**
    * <desc>
    *     添加开发者账号
    * </desc>
    * @param params
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-19
     **/
    Integer saveDeveloperAccount(Map<String,Object> params);

    /**
    * <desc>
    *    安全设置
    * </desc>
    * @param ipAddresses
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-23
     **/
    Integer updateSecuritySetting(@Param("ipAddresses") String ipAddresses,@Param("appId") String appId);

    /**
    * <desc>
    *   启用禁用
    * </desc>
    * @param status
    * @param appId
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-23
     **/
    Integer updateStatus(@Param("status") Integer status,@Param("appId") String appId);

    /**
    * <desc>
    *   有效期授权
    * </desc>
    * @param params
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-23
     **/
    Integer updateEffectTime(Map<String,Object> params);


    /**
    * <desc>
    *      获取开发者账号
    * </desc>
    * @param
    * @return: java.util.List<com.itlong.cloud.POJO.VO.operate.WwOperateDeveloperAccountVO>
    * @author LiuYu
    * @date: 2021-08-19
     **/
    List<WwOperateDeveloperAccountVO> getDeveloperAccountPageList(Map<String,Object> params);

    /**
    * <desc>
    *      获取开发者账号记录数
    * </desc>
    * @param developerAccount
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-19
     **/
    Integer getDeveloperAccountPageCount(@Param("developerAccount") String developerAccount);



}
